<para>
If set, selects the GDK backend to use. Selecting a backend requires that
GTK+ is compiled with support for that backend. The following backends can
- be selected:
+ be selected, provided they are included in the GDK libraries you are using:
<variablelist>
<varlistentry>
</variablelist>
Since 3.10, this environment variable can contain a comma-separated list
of backend names, which are tried in order. The list may also contain
- a *, which means: try all remaining backends.
+ a *, which means: try all remaining backends. The special value "help" can
+ be used to make GDK print out a list of all available backends.
For more information about selecting backends, see the gdk_display_manager_get() function.
</para>
</formalpara>
backend_list = g_getenv ("GDK_BACKEND");
if (backend_list == NULL)
backend_list = allowed_backends;
+ else if (g_strcmp0 (backend_list, "help") == 0)
+ {
+ fprintf (stderr, "Supported GDK backends:");
+ for (i = 0; gdk_backends[i].name != NULL; i++)
+ fprintf (stderr, " %s", gdk_backends[i].name);
+ fprintf (stderr, "\n");
+
+ backend_list = allowed_backends;
+ }
backends = g_strsplit (backend_list, ",", 0);
display = NULL;